<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: pm_uc3c.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">pm_uc3c.h File Reference</div>  </div>
</div>
<div class="contents">

<p>Power Manager(PM) driver interface.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;avr32/io.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="compiler_8h_source.html">compiler.h</a>&quot;</code><br/>
</div>
<p><a href="pm__uc3c_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#aa1626f662e07d1aa23645de70383a8be">_PM_UC3C_H_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ad011b4312da9dd961e90e9884e621f74">PM_POLL_TIMEOUT</a>&#160;&#160;&#160;100000</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The timeguard used for polling (expressed in ticks).  <a href="#ad011b4312da9dd961e90e9884e621f74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#aaa19f9329d0a760de066a859915daa11">PM_NOT_SUPPORTED</a>&#160;&#160;&#160;(-10000)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Define "not supported" for the power manager features.  <a href="#aaa19f9329d0a760de066a859915daa11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#a83e474a409f4821a1ffb7a538882ce5f">PM_UNLOCK</a>(reg)&#160;&#160;&#160;(AVR32_PM.unlock = (unsigned long)(AVR32_PM_UNLOCK_KEY_VALUE &lt;&lt; AVR32_PM_UNLOCK_KEY_OFFSET)|(reg))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock PM register macro.  <a href="#a83e474a409f4821a1ffb7a538882ce5f"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">pm_clk_src_t</a> { <br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a885e82bb9f21b5bf240661947d42072e">PM_CLK_SRC_SLOW</a> =  AVR32_PM_MCSEL_SLOW, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a49f43b46cf68d1dc4640584cd8ea9544">PM_CLK_SRC_OSC0</a> =  AVR32_PM_MCSEL_OSC0, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ae6d449f47385521546867f9dc9dbe154">PM_CLK_SRC_OSC1</a> =  AVR32_PM_MCSEL_OSC1, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a53a1f3a48c75772aa26f29cfb332bbdb">PM_CLK_SRC_PLL0</a> =  AVR32_PM_MCSEL_PLL0, 
<br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a1e251e0f3de3c6858219f063c70b92ba">PM_CLK_SRC_PLL1</a> =  AVR32_PM_MCSEL_PLL1, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a22d4905250f67bb1306bd9049eb61e3c">PM_CLK_SRC_RC8M</a> =  AVR32_PM_MCSEL_RCOSC8, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a7590022a64df93ebd0bde5cc38cde8a5">PM_CLK_SRC_RCRIPOSC</a> =  AVR32_PM_MCSEL_CRIPOSC, 
<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ad0ad6e68968757591d619c6024cd4e73">PM_CLK_SRC_RC120M</a> =  AVR32_PM_MCSEL_RC120M, 
<br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a51c2eff117a35b4d9013b77740f552ad">PM_CLK_SRC_INVALID</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Device-specific data.  <a href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a> { <br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca8f30cb60acdab990ecbe9dadd74f3d67">PM_CLK_DOMAIN_0</a> =  AVR32_PM_CLK_GRP_CPU, 
<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535caa36a86f57a2a32507ce7a84537751ef3">PM_CLK_DOMAIN_1</a> =  AVR32_PM_CLK_GRP_HSB, 
<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca75bf7740192d422d49cc143026403d0e">PM_CLK_DOMAIN_2</a> =  AVR32_PM_CLK_GRP_PBA, 
<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca159fdb5cbf3d14bfee214a9b6e10c91c">PM_CLK_DOMAIN_3</a> =  AVR32_PM_CLK_GRP_PBB, 
<br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca208df795621e2e61888aff5fe95bf70c">PM_CLK_DOMAIN_4</a> =  AVR32_PM_CLK_GRP_PBC, 
<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca751484b79b7f306e82e4d1a631cb9b59">PM_CLK_DOMAIN_INVALID</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The clock domains of the power manager.  <a href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">pm_divratio_t</a> { <br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca30c7faba7d6d0532ac28e39bf02ff061">PM_CKSEL_DIVRATIO_2</a> =  0, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca7f998cb06cadeca4c20a62174309750e">PM_CKSEL_DIVRATIO_4</a>, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cae395ebfc33ac30b46edfec9d43d11229">PM_CKSEL_DIVRATIO_8</a>, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cacbb398f7cc39e5aa7754699a9687643d">PM_CKSEL_DIVRATIO_16</a>, 
<br/>
&#160;&#160;<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea40191275793e135fb3b3c792b77ab3">PM_CKSEL_DIVRATIO_32</a>, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca90109336eb88c021bc7846f258cb2c53">PM_CKSEL_DIVRATIO_64</a>, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea080e0910a2096b31df599973e49fc8">PM_CKSEL_DIVRATIO_128</a>, 
<a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca962015a41d3c318f04eb07f041cb4153">PM_CKSEL_DIVRATIO_256</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The possible synchronous clock division ratio.  <a href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Clock Functions</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ae8ae9d9b5af1bbd592f7dce6e11677b0">pm_set_mclk_source</a> (<a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">pm_clk_src_t</a> src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the main clock.  <a href="#ae8ae9d9b5af1bbd592f7dce6e11677b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#aceb9e54e518efca8516f4af990489cc5">pm_config_mainclk_safety</a> (bool cfd, bool final)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the main clock safety mechanisms.  <a href="#aceb9e54e518efca8516f4af990489cc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ad473d037e202983e552d891dac92ade1">pm_set_clk_domain_div</a> (<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a> clock_domain, <a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">pm_divratio_t</a> divratio)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the division ratio for a clock domain.  <a href="#ad473d037e202983e552d891dac92ade1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ac77be1957392fe87dad5adff282c5255">pm_disable_clk_domain_div</a> (<a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a> clock_domain)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the division ratio for a clock domain.  <a href="#ac77be1957392fe87dad5adff282c5255"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ab99d1b12a729c6e6f765e951089be571">pm_wait_for_clk_ready</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait actively for the clock settings to be effective.  <a href="#ab99d1b12a729c6e6f765e951089be571"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Module Functions</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#a07ec689d5d7bbb41b9bacd7589209f8d">pm_enable_module</a> (unsigned long module)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the clock of a module.  <a href="#a07ec689d5d7bbb41b9bacd7589209f8d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#a03d78b08e8181f62ae8fbc8095bc54b8">pm_disable_module</a> (unsigned long module)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the clock of a module.  <a href="#a03d78b08e8181f62ae8fbc8095bc54b8"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Reset Functions</div></td></tr>
<tr><td colspan="2"><div class="groupHeader">Interrupt Functions</div></td></tr>
<tr><td colspan="2"><div class="groupHeader">Misc Functions</div></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Sleep Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pm__uc3c_8h.html#ac11cc59a43dd9ec6b7fb43580453eff7">SLEEP</a>(sleep_mode)&#160;&#160;&#160;{__asm__ __volatile__ (&quot;sleep &quot;STRINGZ(sleep_mode));}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the MCU in the specified sleep mode.  <a href="#ac11cc59a43dd9ec6b7fb43580453eff7"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Power Manager(PM) driver interface. </p>
<ul>
<li>Compiler: IAR EWAVR32 and GNU GCC for AVR32</li>
<li>Supported devices: All AVR32 UC3C devices.</li>
<li>AppNote:</li>
</ul>
<dl class="author"><dt><b>Author:</b></dt><dd>Atmel Corporation: <a href="http://www.atmel.com">http://www.atmel.com</a> <br/>
 Support and FAQ: <a href="http://support.atmel.no/">http://support.atmel.no/</a> </dd></dl>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="aa1626f662e07d1aa23645de70383a8be"></a><!-- doxytag: member="pm_uc3c.h::_PM_UC3C_H_" ref="aa1626f662e07d1aa23645de70383a8be" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define _PM_UC3C_H_</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aaa19f9329d0a760de066a859915daa11"></a><!-- doxytag: member="pm_uc3c.h::PM_NOT_SUPPORTED" ref="aaa19f9329d0a760de066a859915daa11" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PM_NOT_SUPPORTED&#160;&#160;&#160;(-10000)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Define "not supported" for the power manager features. </p>

</div>
</div>
<a class="anchor" id="ad011b4312da9dd961e90e9884e621f74"></a><!-- doxytag: member="pm_uc3c.h::PM_POLL_TIMEOUT" ref="ad011b4312da9dd961e90e9884e621f74" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PM_POLL_TIMEOUT&#160;&#160;&#160;100000</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The timeguard used for polling (expressed in ticks). </p>

</div>
</div>
<a class="anchor" id="a83e474a409f4821a1ffb7a538882ce5f"></a><!-- doxytag: member="pm_uc3c.h::PM_UNLOCK" ref="a83e474a409f4821a1ffb7a538882ce5f" args="(reg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PM_UNLOCK</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">reg</td><td>)</td>
          <td>&#160;&#160;&#160;(AVR32_PM.unlock = (unsigned long)(AVR32_PM_UNLOCK_KEY_VALUE &lt;&lt; AVR32_PM_UNLOCK_KEY_OFFSET)|(reg))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unlock PM register macro. </p>

</div>
</div>
<a class="anchor" id="ac11cc59a43dd9ec6b7fb43580453eff7"></a><!-- doxytag: member="pm_uc3c.h::SLEEP" ref="ac11cc59a43dd9ec6b7fb43580453eff7" args="(sleep_mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SLEEP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sleep_mode</td><td>)</td>
          <td>&#160;&#160;&#160;{__asm__ __volatile__ (&quot;sleep &quot;STRINGZ(sleep_mode));}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the MCU in the specified sleep mode. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Precautions should be taken before entering sleep mode. Refer to the datasheet chapter 'Power Manager'.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sleep_mode</td><td>The sleep mode index </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="aea4a6cecabd6ace50e11b1588576535c"></a><!-- doxytag: member="pm_uc3c.h::pm_clk_domain_t" ref="aea4a6cecabd6ace50e11b1588576535c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The clock domains of the power manager. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535ca8f30cb60acdab990ecbe9dadd74f3d67"></a><!-- doxytag: member="PM_CLK_DOMAIN_0" ref="aea4a6cecabd6ace50e11b1588576535ca8f30cb60acdab990ecbe9dadd74f3d67" args="" -->PM_CLK_DOMAIN_0</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535caa36a86f57a2a32507ce7a84537751ef3"></a><!-- doxytag: member="PM_CLK_DOMAIN_1" ref="aea4a6cecabd6ace50e11b1588576535caa36a86f57a2a32507ce7a84537751ef3" args="" -->PM_CLK_DOMAIN_1</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535ca75bf7740192d422d49cc143026403d0e"></a><!-- doxytag: member="PM_CLK_DOMAIN_2" ref="aea4a6cecabd6ace50e11b1588576535ca75bf7740192d422d49cc143026403d0e" args="" -->PM_CLK_DOMAIN_2</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535ca159fdb5cbf3d14bfee214a9b6e10c91c"></a><!-- doxytag: member="PM_CLK_DOMAIN_3" ref="aea4a6cecabd6ace50e11b1588576535ca159fdb5cbf3d14bfee214a9b6e10c91c" args="" -->PM_CLK_DOMAIN_3</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535ca208df795621e2e61888aff5fe95bf70c"></a><!-- doxytag: member="PM_CLK_DOMAIN_4" ref="aea4a6cecabd6ace50e11b1588576535ca208df795621e2e61888aff5fe95bf70c" args="" -->PM_CLK_DOMAIN_4</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aea4a6cecabd6ace50e11b1588576535ca751484b79b7f306e82e4d1a631cb9b59"></a><!-- doxytag: member="PM_CLK_DOMAIN_INVALID" ref="aea4a6cecabd6ace50e11b1588576535ca751484b79b7f306e82e4d1a631cb9b59" args="" -->PM_CLK_DOMAIN_INVALID</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310"></a><!-- doxytag: member="pm_uc3c.h::pm_clk_src_t" ref="a6d0083840f5a3cef12557a5b93b7d310" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">pm_clk_src_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Device-specific data. </p>
<p>The clock sources of the power manager. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a885e82bb9f21b5bf240661947d42072e"></a><!-- doxytag: member="PM_CLK_SRC_SLOW" ref="a6d0083840f5a3cef12557a5b93b7d310a885e82bb9f21b5bf240661947d42072e" args="" -->PM_CLK_SRC_SLOW</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a49f43b46cf68d1dc4640584cd8ea9544"></a><!-- doxytag: member="PM_CLK_SRC_OSC0" ref="a6d0083840f5a3cef12557a5b93b7d310a49f43b46cf68d1dc4640584cd8ea9544" args="" -->PM_CLK_SRC_OSC0</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310ae6d449f47385521546867f9dc9dbe154"></a><!-- doxytag: member="PM_CLK_SRC_OSC1" ref="a6d0083840f5a3cef12557a5b93b7d310ae6d449f47385521546867f9dc9dbe154" args="" -->PM_CLK_SRC_OSC1</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a53a1f3a48c75772aa26f29cfb332bbdb"></a><!-- doxytag: member="PM_CLK_SRC_PLL0" ref="a6d0083840f5a3cef12557a5b93b7d310a53a1f3a48c75772aa26f29cfb332bbdb" args="" -->PM_CLK_SRC_PLL0</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a1e251e0f3de3c6858219f063c70b92ba"></a><!-- doxytag: member="PM_CLK_SRC_PLL1" ref="a6d0083840f5a3cef12557a5b93b7d310a1e251e0f3de3c6858219f063c70b92ba" args="" -->PM_CLK_SRC_PLL1</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a22d4905250f67bb1306bd9049eb61e3c"></a><!-- doxytag: member="PM_CLK_SRC_RC8M" ref="a6d0083840f5a3cef12557a5b93b7d310a22d4905250f67bb1306bd9049eb61e3c" args="" -->PM_CLK_SRC_RC8M</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a7590022a64df93ebd0bde5cc38cde8a5"></a><!-- doxytag: member="PM_CLK_SRC_RCRIPOSC" ref="a6d0083840f5a3cef12557a5b93b7d310a7590022a64df93ebd0bde5cc38cde8a5" args="" -->PM_CLK_SRC_RCRIPOSC</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310ad0ad6e68968757591d619c6024cd4e73"></a><!-- doxytag: member="PM_CLK_SRC_RC120M" ref="a6d0083840f5a3cef12557a5b93b7d310ad0ad6e68968757591d619c6024cd4e73" args="" -->PM_CLK_SRC_RC120M</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a6d0083840f5a3cef12557a5b93b7d310a51c2eff117a35b4d9013b77740f552ad"></a><!-- doxytag: member="PM_CLK_SRC_INVALID" ref="a6d0083840f5a3cef12557a5b93b7d310a51c2eff117a35b4d9013b77740f552ad" args="" -->PM_CLK_SRC_INVALID</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979c"></a><!-- doxytag: member="pm_uc3c.h::pm_divratio_t" ref="a2dec77bcf0a6e6ddb97e22052dc1979c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">pm_divratio_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The possible synchronous clock division ratio. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979ca30c7faba7d6d0532ac28e39bf02ff061"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_2" ref="a2dec77bcf0a6e6ddb97e22052dc1979ca30c7faba7d6d0532ac28e39bf02ff061" args="" -->PM_CKSEL_DIVRATIO_2</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979ca7f998cb06cadeca4c20a62174309750e"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_4" ref="a2dec77bcf0a6e6ddb97e22052dc1979ca7f998cb06cadeca4c20a62174309750e" args="" -->PM_CKSEL_DIVRATIO_4</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979cae395ebfc33ac30b46edfec9d43d11229"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_8" ref="a2dec77bcf0a6e6ddb97e22052dc1979cae395ebfc33ac30b46edfec9d43d11229" args="" -->PM_CKSEL_DIVRATIO_8</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979cacbb398f7cc39e5aa7754699a9687643d"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_16" ref="a2dec77bcf0a6e6ddb97e22052dc1979cacbb398f7cc39e5aa7754699a9687643d" args="" -->PM_CKSEL_DIVRATIO_16</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979caea40191275793e135fb3b3c792b77ab3"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_32" ref="a2dec77bcf0a6e6ddb97e22052dc1979caea40191275793e135fb3b3c792b77ab3" args="" -->PM_CKSEL_DIVRATIO_32</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979ca90109336eb88c021bc7846f258cb2c53"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_64" ref="a2dec77bcf0a6e6ddb97e22052dc1979ca90109336eb88c021bc7846f258cb2c53" args="" -->PM_CKSEL_DIVRATIO_64</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979caea080e0910a2096b31df599973e49fc8"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_128" ref="a2dec77bcf0a6e6ddb97e22052dc1979caea080e0910a2096b31df599973e49fc8" args="" -->PM_CKSEL_DIVRATIO_128</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a2dec77bcf0a6e6ddb97e22052dc1979ca962015a41d3c318f04eb07f041cb4153"></a><!-- doxytag: member="PM_CKSEL_DIVRATIO_256" ref="a2dec77bcf0a6e6ddb97e22052dc1979ca962015a41d3c318f04eb07f041cb4153" args="" -->PM_CKSEL_DIVRATIO_256</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="aceb9e54e518efca8516f4af990489cc5"></a><!-- doxytag: member="pm_uc3c.h::pm_config_mainclk_safety" ref="aceb9e54e518efca8516f4af990489cc5" args="(bool cfd, bool final)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_config_mainclk_safety </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>cfd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>final</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configure the main clock safety mechanisms. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>Refer to the section Clock Failure Detector of the PM chapter in the datasheet</dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>The Critical Path Oscillator (CRIPOSC) must be enabled before enabling the Over Clock Protection mechanism.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">cfd</td><td>Enable/disable the Clock Failure Detection mechanism </td></tr>
    <tr><td class="paramname">final</td><td>If true, make this configuration definitive</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">=0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac77be1957392fe87dad5adff282c5255"></a><!-- doxytag: member="pm_uc3c.h::pm_disable_clk_domain_div" ref="ac77be1957392fe87dad5adff282c5255" args="(pm_clk_domain_t clock_domain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_disable_clk_domain_div </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a>&#160;</td>
          <td class="paramname"><em>clock_domain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disable the division ratio for a clock domain. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">clock_domain</td><td>The clock domain to alter.</td></tr>
  </table>
  </dd>
</dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Care should be taken that each new frequency of the synchronous clocks does not exceed the maximum frequency for each clock domain.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">=0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a03d78b08e8181f62ae8fbc8095bc54b8"></a><!-- doxytag: member="pm_uc3c.h::pm_disable_module" ref="a03d78b08e8181f62ae8fbc8095bc54b8" args="(unsigned long module)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_disable_module </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>module</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disable the clock of a module. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">module</td><td>The module to shut down (use one of the defines in the part-specific header file under "toolchain folder"/avr32/inc(lude)/avr32/; depending on the clock domain, look for the sections "CPU clocks", "HSB clocks", "PBx clocks")</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a07ec689d5d7bbb41b9bacd7589209f8d"></a><!-- doxytag: member="pm_uc3c.h::pm_enable_module" ref="a07ec689d5d7bbb41b9bacd7589209f8d" args="(unsigned long module)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_enable_module </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>module</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Enable the clock of a module. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">module</td><td>The module to clock (use one of the defines in the part-specific header file under "toolchain folder"/avr32/inc(lude)/avr32/; depending on the clock domain, look for the sections "CPU clocks", "HSB clocks", "PBx clocks")</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured.</td></tr>
  </table>
  </dd>
</dl>
<p>Module Functions </p>

</div>
</div>
<a class="anchor" id="ad473d037e202983e552d891dac92ade1"></a><!-- doxytag: member="pm_uc3c.h::pm_set_clk_domain_div" ref="ad473d037e202983e552d891dac92ade1" args="(pm_clk_domain_t clock_domain, pm_divratio_t divratio)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_set_clk_domain_div </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">pm_clk_domain_t</a>&#160;</td>
          <td class="paramname"><em>clock_domain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">pm_divratio_t</a>&#160;</td>
          <td class="paramname"><em>divratio</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the division ratio for a clock domain. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">clock_domain</td><td>The clock domain to alter. </td></tr>
    <tr><td class="paramname">divratio</td><td>The division ratio to set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Care should be taken that each new frequency of the synchronous clocks does not exceed the maximum frequency for each clock domain.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">=0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae8ae9d9b5af1bbd592f7dce6e11677b0"></a><!-- doxytag: member="pm_uc3c.h::pm_set_mclk_source" ref="ae8ae9d9b5af1bbd592f7dce6e11677b0" args="(pm_clk_src_t src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_set_mclk_source </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">pm_clk_src_t</a>&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the main clock. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The clock to use as the main clock.</td></tr>
  </table>
  </dd>
</dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>The input clock to use as the main clock must be enabled before calling this function, otherwise a deadlock will occur.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>An error occured when trying to set the main clock.</td></tr>
  </table>
  </dd>
</dl>
<p>Clock Functions </p>

</div>
</div>
<a class="anchor" id="ab99d1b12a729c6e6f765e951089be571"></a><!-- doxytag: member="pm_uc3c.h::pm_wait_for_clk_ready" ref="ab99d1b12a729c6e6f765e951089be571" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long pm_wait_for_clk_ready </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Wait actively for the clock settings to be effective. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>To avoid an infinite loop, this function checks the clock ready flag PM_POLL_TIMEOUT times.</dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Status. </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>Success. </td></tr>
    <tr><td class="paramname">&lt;0</td><td>Unable to reach a clock ready status within the polling limit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:53 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
